package com.zcgk.modules.file.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 附件表
 * </p>
 *
 * @author Francis
 * @since 2020-02-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_attachment")
@ApiModel(value="SysAttachment对象", description="附件表")
public class AttachmentEntity extends Model<AttachmentEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "附件id")
    @TableId(value = "attachment_id", type = IdType.UUID)
    private String attachmentId;

    @ApiModelProperty(value = "原始附件名")
    private String attachmentName;

    @ApiModelProperty(value = "附件类型：如：txt、jpg")
    private String attachmentType;

    @ApiModelProperty(value = "附件大小：单位：kb")
    private BigDecimal attachmentSize;

    @ApiModelProperty(value = "附件路径：映射路径，非物理路径")
    private String attachmentUrl;

    @ApiModelProperty(value = "排序号")
    private Integer orderNo;

    @ApiModelProperty(value = "所属系统id")
    private String systemIdFk;

    @ApiModelProperty(value = "资源id")
    private String resIdFk;

    @ApiModelProperty(value = "备注：老系统-传表名、新系统-可不传")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.attachmentId;
    }

}
